package avaliador;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java_cup.runtime.Symbol;
import avaliador.syntaxtree.Bloco;

public class Main {

	/**
	 * @param args
	 * @throws FileNotFoundException 
	 */
	public static void main(String[] args) throws FileNotFoundException {
		
		try {
			ALexico lex = new ALexico(new FileInputStream("teste.sql"));
			parser s = new parser(lex);
			
			Symbol exp = s.parse();
			Bloco expr = (Bloco)exp.value;
			
			System.out.printf("Arvore sintatica = \n%s\n\n\n",expr.toString());

		} catch (Throwable ex) {
			System.err.printf("Erro :" + ex);
			ex.printStackTrace();

		}


	}

}